import { Rule } from "./types";

export const PydocstyleRuleList: Rule[] = [
    {
        code: "D100",
        name: "undocumented-public-module",
        descEn: "Missing docstring in public module",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D101",
        name: "undocumented-public-class",
        descEn: "Missing docstring in public class",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D102",
        name: "undocumented-public-method",
        descEn: "Missing docstring in public method",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D103",
        name: "undocumented-public-function",
        descEn: "Missing docstring in public function",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D104",
        name: "undocumented-public-package",
        descEn: "Missing docstring in public package",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D105",
        name: "undocumented-magic-method",
        descEn: "Missing docstring in magic method",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D106",
        name: "undocumented-public-nested-class",
        descEn: "Missing docstring in public nested class",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D107",
        name: "undocumented-public-init",
        descEn: "Missing docstring in __init__",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D200",
        name: "fits-on-one-line",
        descEn: "One-line docstring should fit on one line",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D201",
        name: "no-blank-line-before-function",
        descEn: "No blank lines allowed before function docstring (found {num_lines})",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D202",
        name: "no-blank-line-after-function",
        descEn: "No blank lines allowed after function docstring (found {num_lines})",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D203",
        name: "one-blank-line-before-class",
        descEn: "1 blank line required before class docstring",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D204",
        name: "one-blank-line-after-class",
        descEn: "1 blank line required after class docstring",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D205",
        name: "blank-line-after-summary",
        descEn: "1 blank line required between summary line and description",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D206",
        name: "indent-with-spaces",
        descEn: "Docstring should be indented with spaces, not tabs",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D207",
        name: "under-indentation",
        descEn: "Docstring is under-indented",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D208",
        name: "over-indentation",
        descEn: "Docstring is over-indented",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D209",
        name: "new-line-after-last-paragraph",
        descEn: "Multi-line docstring closing quotes should be on a separate line",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D210",
        name: "surrounding-whitespace",
        descEn: "No whitespaces allowed surrounding docstring text",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D211",
        name: "blank-line-before-class",
        descEn: "No blank lines allowed before class docstring",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D212",
        name: "multi-line-summary-first-line",
        descEn: "Multi-line docstring summary should start at the first line",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D213",
        name: "multi-line-summary-second-line",
        descEn: "Multi-line docstring summary should start at the second line",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D214",
        name: "section-not-over-indented",
        descEn: `Section is over-indented ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D215",
        name: "section-underline-not-over-indented",
        descEn: `Section underline is over-indented ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D300",
        name: "triple-single-quotes",
        descEn: `Use triple double quotes """`,
        descCn: "",
        autoFix: false,
    },
    {
        code: "D301",
        name: "escape-sequence-in-docstring",
        descEn: `Use r""" if any backslashes in a docstring`,
        descCn: "",
        autoFix: false,
    },
    {
        code: "D400",
        name: "ends-in-period",
        descEn: "First line should end with a period",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D401",
        name: "non-imperative-mood",
        descEn: `First line of docstring should be in imperative mood: "{first_line}"`,
        descCn: "",
        autoFix: false,
    },
    {
        code: "D402",
        name: "no-signature",
        descEn: "First line should not be the function's signature",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D403",
        name: "first-line-capitalized",
        descEn: "First word of the first line should be capitalized: {} -> {}",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D404",
        name: "docstring-starts-with-this",
        descEn: `First word of the docstring should not be "This"`,
        descCn: "",
        autoFix: false,
    },
    {
        code: "D405",
        name: "capitalize-section-name",
        descEn: `Section name should be properly capitalized ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D406",
        name: "new-line-after-section-name",
        descEn: `Section name should end with a newline ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D407",
        name: "dashed-underline-after-section",
        descEn: `Missing dashed underline after section ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D408",
        name: "section-underline-after-name",
        descEn: `Section underline should be in the line following the section's name ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D409",
        name: "section-underline-matches-section-length",
        descEn: `Section underline should match the length of its name ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D410",
        name: "no-blank-line-after-section",
        descEn: `Missing blank line after section ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D411",
        name: "no-blank-line-before-section",
        descEn: `Missing blank line before section ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D412",
        name: "blank-lines-between-header-and-content",
        descEn: `No blank lines allowed between a section header and its content ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D413",
        name: "blank-line-after-last-section",
        descEn: `Missing blank line after last section ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D414",
        name: "empty-docstring-section",
        descEn: `Section has no content ("{name}")`,
        descCn: "",
        autoFix: false,
    },
    {
        code: "D415",
        name: "ends-in-punctuation",
        descEn: "First line should end with a period, question mark, or exclamation point",
        descCn: "",
        autoFix: true,
    },
    {
        code: "D416",
        name: "section-name-ends-in-colon",
        descEn: `Section name should end with a colon ("{name}")`,
        descCn: "",
        autoFix: true,
    },
    {
        code: "D417",
        name: "undocumented-param",
        descEn: "Missing argument description in the docstring: {name}",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D418",
        name: "overload-with-docstring",
        descEn: "Function decorated with @overload shouldn't contain a docstring",
        descCn: "",
        autoFix: false,
    },
    {
        code: "D419",
        name: "empty-docstring",
        descEn: "Docstring is empty",
        descCn: "",
        autoFix: false,
    },
];